<include file="public:header"/>
<include file="public:sidebar"/>
<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
            微信红包充值查询
        </h1>
        <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
            <li class="active">红包查询</li>
        </ol>
    </section>
    <!-- Main content -->
    <section class="content">
        <div class="col-md-12">
            <div style="margin: 10px;">
                <button onclick="history.go(-1)" class="layui-btn layui-btn-sm layui-btn-radius layui-btn-danger">
                    <i class="layui-icon">&#xe65c;</i>返回
                </button>
            </div>
            <!-- Horizontal Form -->
            <div class="box box-info" style="min-height: 350px">
                <div class="box-header with-border">
                    <h3 class="box-title">查询红包</h3>
                </div>
                <!-- /.box-header -->
                <!-- form start -->
                <form action="{:Url('admin/pay/redpack_query')}" method="post"
                      class="form-horizontal layui-form" autocomplete="off">
                    <div class="box-body">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">
                                查询单号
                            </label>
                            <div class="col-sm-4">
                                <input type="text" class="form-control"
                                   placeholder="查询单号" name="order_id"
                                   lay-verify="required">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">
                                订单类型
                            </label>
                            <div class="col-sm-4">
                                <select name="type">
                                    <option value="">选择红包类型</option>
                                    <option value="lottery_log">红包抽奖</option>
                                    <option value="proxy_withdraw">代理提现</option>
                                    <option value="mch_withdraw">商户提现</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">
                            </label>
                            <div class="col-sm-4">
                                <button type="submit" class="btn btn-info" lay-submit lay-filter="*">查询</button>
                                <!--<button type="reset" class="btn btn-default">取消</button>-->
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </section>
    <!-- /.content -->
</div>
<script>
    var url = "{:Url('proxy/index')}";
    layui.use(['form','layer','code'],function () {
        var form = layui.form,
            layer = layui.layer;

        form.on('submit(*)', function(data){
            var index = layer.load(2,{shade: [0.8, '#000']});
            $.post(data.form.action,data.field,function (result) {
                layer.close(index);
                if(result.code){
                    layer.msg(result.msg);
                    return false;
                }
                layer.open({
                    type: 1,
                    title: '红包查询',
                    area: ['700px', '500px'],
                    shade: false,
                    content: '<pre class="layui-code" id="code" style="padding: 20px;">\n'
                        + result.data.json+
                        '</pre>'
                });
                layui.code({
                    title: '红包查询结果' ,
                    skin: 'notepad',
                    about: false,
                    encode: true
                });
                //I407998817932633
            });
            return false;
        });
    });
</script>
<include file="public:footer"/>